package com.jxw.utils;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;
import com.jxw.launcher.R;

/* loaded from: classes.dex */
public class ToastUtil {
    public static void showMessage(Context context, String str) {
        showMessage(context, str, 1);
    }

    public static void showMessage(Context context, int i) {
        showMessage(context, i, 1);
    }

    public static void showMessage(Context context, String str, int i) {
        Toast.makeText(context, str, i).show();
    }

    public static void showMessage(Context context, int i, int i2) {
        Toast.makeText(context, i, i2).show();
    }

    public static void showTextToastDia1(Context context, String str) {
        View inflate = LayoutInflater.from(context).inflate(R.layout.toast_text_layout, (ViewGroup) null);
        ((TextView) inflate.findViewById(R.id.tv_message)).setText(str);
        Toast toast = new Toast(context);
        toast.setGravity(17, 0, 0);
        toast.setDuration(0);
        toast.setView(inflate);
        toast.show();
    }

    public static void showTextToastDia(Context context, String str) {
        View inflate = LayoutInflater.from(context).inflate(R.layout.toast_text_layout, (ViewGroup) null);
        ((TextView) inflate.findViewById(R.id.tv_message)).setText(str);
        Toast toast = new Toast(context);
        toast.setGravity(17, 0, 0);
        toast.setDuration(1);
        toast.setView(inflate);
        toast.show();
    }

    public static void showTextToastDiaflp(Context context, String str) {
        View inflate = LayoutInflater.from(context).inflate(R.layout.toast_text_layout, (ViewGroup) null);
        ((TextView) inflate.findViewById(R.id.tv_message)).setText(str);
        Toast toast = new Toast(context);
        toast.setGravity(17, 0, 0);
        toast.setDuration(1);
        toast.setView(inflate);
        toast.show();
    }
}
